import request from "@/request/request";

/* 获取商品详情的接口 */
export const getGoodDetailAPI = (id) => {
    return request({
        url: `/item/${id}`,
        method: "GET"
    })
}


/* 将商品添加到购物车(或者对已有商品进行数量改动) */
export const addToCartOrUpdateAPI = ({skuId, skuNum}) => {
    return request({
        url: `cart/addToCart/${skuId}/${skuNum}`,
        method: "POST"
    })
}
